<?php
require_once "koneksi.php";
require_once "lib.php";
ini_set('max_execution_time', 3600);
$no_data = 0;
$data_siswa=get_data_siswa();
?>
<style>
	.alert {
		padding: 15px;
		margin-bottom: 20px;
		border: 1px solid transparent;
		border-radius: 4px;
		width: 300px;
		margin-left: auto;
		margin-right: auto;
		margin-top: 100px;
		font-family: 'Arial';
		font-size: 14px;
		text-align: center;
	}
	
	.alert-info {
		color: #31708f;
		background-color: #d9edf7;
		border-color: #bce8f1;
	}

</style>
<div class='alert alert-info'>Proses Pengiriman SMS</div>
<?php
$no = 0;
foreach($data_siswa as $key=>$val){

	$det_wali=get_detail_wali($val['nis']);
	if(!empty($det_wali)){
		$nohp_wali=$det_wali['tlp'];
	}else{
		$nohp_wali="";
	}
	if($nohp_wali != ''){
		$str_sms="Diumumkan kpd walimurid yg blm menyelesaikan biaya pendidikan dimohon segera menyelesaikan sblm penerimaan raport. Bagi yg sudah, kami ucapkan terima kasih. SAF";
		
		if($nohp_wali!=""){
			kirim_sms($nohp_wali,$str_sms);
		}
		echo $nohp_wali."<br>";
	}
}
kirim_sms("085742339453","Pengiriman SMS Selesai");
echo "<meta http-equiv='refresh' content='0; url=pesan.php?t=sms'>";
?>
</table>